Optimal. Leaf size=68 \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac {1}{2} x^2 (f-2 g+4 h)+\frac {1}{3} x^3 (g-2 h)+\frac {h x^4}{4} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {1586, 1850} \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac {1}{2} x^2 (f-2 g+4 h)+\frac {1}{3} x^3 (g-2 h)+\frac {h x^4}{4} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 1850
Rubi steps
\begin {align*} \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4\right )}{4-5 x^2+x^4} \, dx &=\int \frac {d+e x+f x^2+g x^3+h x^4}{2+x} \, dx\\ &=\int \left (e \left (1-\frac {2 (f-2 g+4 h)}{e}\right )+(f-2 g+4 h) x+(g-2 h) x^2+h x^3+\frac {d-2 e+4 f-8 g+16 h}{2+x}\right ) \, dx\\ &=(e-2 f+4 g-8 h) x+\frac {1}{2} (f-2 g+4 h) x^2+\frac {1}{3} (g-2 h) x^3+\frac {h x^4}{4}+(d-2 e+4 f-8 g+16 h) \log (2+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 68, normalized size = 1.00 \[ \log (x+2) (d-2 e+4 f-8 g+16 h)+x (e-2 f+4 g-8 h)+\frac {1}{2} x^2 (f-2 g+4 h)+\frac {1}{3} x^3 (g-2 h)+\frac {h x^4}{4} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.21, size = 62, normalized size = 0.91 \[ \frac {1}{4} \, h x^{4} + \frac {1}{3} \, {\left (g - 2 \, h\right )} x^{3} + \frac {1}{2} \, {\left (f - 2 \, g + 4 \, h\right )} x^{2} + {\left (e - 2 \, f + 4 \, g - 8 \, h\right )} x + {\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.23, size = 74, normalized size = 1.09 \[ \frac {1}{4} \, h x^{4} + \frac {1}{3} \, g x^{3} - \frac {2}{3} \, h x^{3} + \frac {1}{2} \, f x^{2} - g x^{2} + 2 \, h x^{2} - 2 \, f x + 4 \, g x - 8 \, h x + x e + {\left (d + 4 \, f - 8 \, g + 16 \, h - 2 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 87, normalized size = 1.28 \[ \frac {h \,x^{4}}{4}+\frac {g \,x^{3}}{3}-\frac {2 h \,x^{3}}{3}+\frac {f \,x^{2}}{2}-g \,x^{2}+2 h \,x^{2}+d \ln \left (x +2\right )+e x -2 e \ln \left (x +2\right )-2 f x +4 f \ln \left (x +2\right )+4 g x -8 g \ln \left (x +2\right )-8 h x +16 h \ln \left (x +2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 62, normalized size = 0.91 \[ \frac {1}{4} \, h x^{4} + \frac {1}{3} \, {\left (g - 2 \, h\right )} x^{3} + \frac {1}{2} \, {\left (f - 2 \, g + 4 \, h\right )} x^{2} + {\left (e - 2 \, f + 4 \, g - 8 \, h\right )} x + {\left (d - 2 \, e + 4 \, f - 8 \, g + 16 \, h\right )} \log \left (x + 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.03, size = 64, normalized size = 0.94 \[ x^3\,\left (\frac {g}{3}-\frac {2\,h}{3}\right )+\ln \left (x+2\right )\,\left (d-2\,e+4\,f-8\,g+16\,h\right )+\frac {h\,x^4}{4}+x^2\,\left (\frac {f}{2}-g+2\,h\right )+x\,\left (e-2\,f+4\,g-8\,h\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.21, size = 63, normalized size = 0.93 \[ \frac {h x^{4}}{4} + x^{3} \left (\frac {g}{3} - \frac {2 h}{3}\right ) + x^{2} \left (\frac {f}{2} - g + 2 h\right ) + x \left (e - 2 f + 4 g - 8 h\right ) + \left (d - 2 e + 4 f - 8 g + 16 h\right ) \log {\left (x + 2 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________